import React,{Component} from 'react';
import HocTest from '../hoc/withRouter';
import MyDialog from '../components/MyDialog';

interface IProps{
  cId?:number;
  name:string;
  newValue?:string
}

interface IState{
  name:string,
  list:Array<string>
}
class ClassComponent extends Component<IProps,IState>{
  // this.state.id = 10; // 
  readonly state = {
    name:'lalala',
    list:['黄瓜','胡萝卜','香肠','菠萝','西瓜']
  };
  static defaultProps = {
    
  };

  render(): React.ReactNode {
    return  <div>
      <MyDialog></MyDialog>
      {this.props.name}
      <div>
        {this.state.list&&this.state.list.map(item=><li key={item}>
          {item}
        </li>)}
      </div>
    </div>;
  }
} 

export default ClassComponent;